package com.guyan.vo;

/**
 * ClassName： CategoryTreeVo
 * Date： 2021/6/9 8:09
 *
 * @author 孤焰
 * @version 1.0
 **/

import com.guyan.entity.Category;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@AllArgsConstructor
@NoArgsConstructor
public class CategoryTreeVo {
    private Integer id;
    private Integer pid;
    private String title;
    private Integer status;
    private Integer sortOrder;

    public CategoryTreeVo (Category category) {
        this.id = category.getId();
        this.pid = category.getParentId();
        this.title = category.getName();
        this.status = category.getStatus();
        this.sortOrder = category.getSortOrder();
    }
}
